package com.design.visitor;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @author ytj
 * @date 2024/11/28 13:26
 */
public class Teacher extends User{

    public Teacher(String name, String identity, String className) {
        super(name, identity, className);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visitor(this);
    }

    /**
     * 升学率
     * */
    public Double entere(){
        return new BigDecimal(Math.random()*100).setScale(2, RoundingMode.HALF_UP).doubleValue();
    }
}
